<?php
/**
 * 描述：会员登录。
 * @final
 */
final class Exec_Account_Login_Public extends Exec
{
    public function Get()
    {
    }
    
    public function  Post()
    {
        #获取参数
        $username=Functions::FormArgs('Username');
        $password=Functions::FormArgs('Password');

        #验证逻辑
        $account=new Account($username,$password);        
        if($account->IsLogin())
        {
            echo 'Logined:'.$account->Username;
        }
        else
        {            
            $result=$account->Verify();
            if($result=='Normal'){
                $account->Login();
            }
            else{
                $account->Misregistration();
            }
            echo $result.':'.$account->Username;
        } 
        $account=NULL;
    }
}
?>